import Vue from 'vue'
import Vuex from 'vuex'
// import stu from './modules/stu.js'
// import tea from './modules/tea.js'

import createPersistedState from "vuex-persistedstate"
import login from './modules/login.js'
import user from './modules/user.js'
Vue.use(Vuex)

export default new Vuex.Store({
	plugins: [
		createPersistedState({
			storage: {
				getItem: key => uni.getStorageSync(key),
				setItem: (key, value) => uni.setStorageSync(key, value),
				removeItem: key => uni.removeStorageSync(key)
			}
		})
	],
	state: {},
	getters: {

	},
	actions: {

	},
	mutations: {

	},
	modules: {
		login,
		user
	}
})